<?php

declare(strict_types=1);

namespace App\CustHub\Request;

use Mine\MineFormRequest;

class RoomInviteAcceptRequest extends MineFormRequest
{
    public function saveRules(): array
    {
        return [
            'robot_id' => 'required',
            'status' => 'required|in:0,1',
            'delay_accept_limit' => 'integer|min:0',
//            'accept_interval' => 'required',
            'sleep_switch' => 'in:0,1',
            'sleep_rules' => 'required_if:sleep_switch,1'
        ];
    }

    public function updateRules(): array
    {
        return array_merge(['id' => 'required'], $this->saveRules());
    }

    public function deleteRules():array
    {
        return [
            'id' => 'required'
        ];
    }

    public function getRecordListRules(): array
    {
        return [
            'id' => 'required'
        ];
    }
}